﻿using UnityEngine;

namespace CWM.Skinn
{
   
    [System.Serializable]
    public class AvatarSettings
    {
        [Range(0f, 1f)] public float upperArmTwist = 0.5f;
        [Range(0f, 1f)] public  float lowerArmTwist = 0.5f;
        [Range(0f, 1f)] public float upperLegTwist = 0.5f;
        [Range(0f, 1f)] public float lowerLegTwist = 0.5f;
        [Range(0f, 1f)] public float armStretch = 0.05f;
        [Range(0f, 1f)] public float legStretch = 0.05f;
        [Range(0f, 1f)] public float feetSpacing = 0.0f;

        public bool hasTranslationDoF = false;

        public static implicit operator bool(AvatarSettings value) { return value != null; }
        public static readonly AvatarSettings DefaultValue = new AvatarSettings();
        public static AvatarSettings FallbackToDefualtValue(AvatarSettings source) { if (!source) return DefaultValue; else return source; }
    }
}